<?
/**
 * User database object
 */
class UserDbo extends HistoryTimelineDbo {

/**
 * constructor - define object property -> table mappings
 */
public function __construct() {
	// parent
	parent::__construct();
	// table name
	$this->setDatabaseTable('app_users');
	// object properties
	$this->propertyAdd('CreateUid');
	$this->propertyAdd('CreateDate');
	$this->propertyAdd('DisableDate');
	$this->propertyAdd('DisableUid');
	$this->propertyAdd('DisplayName');
	$this->propertyAdd('Enabled');
	$this->propertyAdd('FirstName');
	$this->propertyAdd('Id');
	$this->propertyAdd('IsAdmin');
	$this->propertyAdd('LastName');
	$this->propertyAdd('Login');
	$this->propertyAdd('Password');
	$this->propertyAdd('RevUid');
	$this->propertyAdd('RevDate');
	// Set id property
	$this->setIdProperty('Id');
	// Friendly Descriptions
	$this->setPropertyDescription('DisplayName', 'Display Name');
	$this->setPropertyDescription('FirstName',   'First Name');
	$this->setPropertyDescription('LastName',    'Last Name');
	// Date properties
	$this->setPropertyIsDate('CreateDate');
	$this->setPropertyIsDate('DisableDate');
	$this->setPropertyIsDate('RevDate');
	// Numeric properties
	$this->setPropertyIsNumeric('CreateUid');
	$this->setPropertyIsNumeric('DisableUid');
	$this->setPropertyIsNumeric('Id');
	$this->setPropertyIsNumeric('IsAdmin');
	$this->setPropertyIsNumeric('Enabled');
	$this->setPropertyIsNumeric('RevUid');
	// Set property lengths
	$this->setPropertyMaxLength('CreateUid',    10);
	$this->setPropertyMaxLength('CreateDate',   19);
	$this->setPropertyMaxLength('DisableUid',   10);
	$this->setPropertyMaxLength('DisableDate',  19);
	$this->setPropertyMaxLength('DisplayName', 255);
	$this->setPropertyMaxLength('Enabled',       1);
	$this->setPropertyMaxLength('FirstName',    50);
	$this->setPropertyMaxLength('Id',           10);
	$this->setPropertyMaxLength('IsAdmin',       1);
	$this->setPropertyMaxLength('LastName',     50);
	$this->setPropertyMaxLength('Login',       255);
	$this->setPropertyMaxLength('Password',     32);
	$this->setPropertyMaxLength('RevUid',       10);
	$this->setPropertyMaxLength('RevDate',      19);
	}
}
?>
